
#pragma once

#include "ProcessSystem.h"


class StateMachine;

static const int DISTANCIA_VISTA = 6000;
static const int DISTANCIA_ATAQUE = 50000;
static const int DISTANCIA_ABANDONAR = 100000;

class EstadoAI : public Process
{

protected:

	unsigned long mIDActor;
	StateMachine * mStateMachine;

public:

	typedef boost::shared_ptr<EstadoAI> Ptr;

	//! Constructs an AIState
	//! 
	//! @param state_machine Pointer to the state machine. It should remain
	//! valid as long as a function on the AIState may be called.
	//!
	//! @param actor_id The id of the actor to which this state is linked.
	EstadoAI(StateMachine * state_machine, unsigned long actor_id);

	//! Called automatically by the process system to update the state.
	//!
	//! @param delta Time elapsed since the last update.
	void OnUpdate(int delta);

	//! Called when the StateAI is destroyed.
	//!
	virtual ~EstadoAI() {}
};